import java.util.Scanner;
public class Lab04Task04 {
	public static void main(String[] args) {
		String str1,str2,str3,str4;
		int s1;
		char c1;
		Scanner kb=new Scanner(System.in);
		System.out.println("please enter a name consisting of two words:");
		str1=kb.nextLine();
		s1 = str1.indexOf(" ");
		str2 = str1.substring(s1+1);
		str3 = str1.toUpperCase();
		str4=str2.toUpperCase();
		c1= str3.charAt(0);
		System.out.print("Your name is: "+str4+", "+c1+".");
	}
}